|
|
On 7 Dec 1999 07:34:21 -0500, Nieminen Juha wrote:
> 1) Can I use an object definition as a pattern type? If yes, what would be
>the easiest way?
Probably, yes. The easiest thing to do is probably start with Chris Huff's
object-based pattern code, because he's probably already gone to the trouble
to add a pointer to the associated object (and associated constructor/copy/
destructor code) to TPAT_FIELDS. He'll also have added some parse code you
can use as an example of how to do it yourself.
> 2) Is there any way in the existing julia_fractal code to get the number
>of iterations (and other information) for a specific point in space?
A fractal object has "virtual functions," one of which is (rougly)
Iterate( vector, fractal *). That function returns true if the iteration
count exceeds the maximum, else it returns false. With application of
some elbow grease, you could change the implementations of that function
(in quatern.c, one for each evaluation method) to take a pointer to an
iteration count in addition. You wouldn't even have to change any of
the current places it gets called, since it gets called through a macro
defined in fractal.h.
--
These are my opinions. I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html
Post a reply to this message
|
|